Skip to main content

ContrastiveLossLayer

ContrastiveLossLayer[] represents a loss layer that computes a loss based on a distance metric and a target that specifies whether the distance should be minimized or maximized.

ContrastiveLossLayer[margin] specifies a distance above which the loss is zero for True targets.

Please visit the official Wolfram Language Reference for more details and examples on core symbols.